import 'dart:convert' show json;


class TestListModel {

  int id;
  String author;
  String isshow;
  String istop;
  String posttime;
  String title;
  String type;


  TestListModel.fromParams({this.id, this.author, this.isshow, this.istop, this.posttime, this.title, this.type});

  factory TestListModel(jsonStr) => jsonStr is String ? TestListModel.fromJson(json.decode(jsonStr)) : TestListModel.fromJson(jsonStr);

  TestListModel.fromJson(jsonRes) {
    id = jsonRes['id'];
    author = jsonRes['author'];
    isshow = jsonRes['isshow'];
    istop = jsonRes['istop'];
    posttime = jsonRes['posttime'];
    title = jsonRes['title'];
    type = jsonRes['type'];

  }

  @override
  String toString() {
    return '{"id": $id,"author": ${author != null?'${json.encode(author)}':'null'},"isshow": ${isshow != null?'${json.encode(isshow)}':'null'},"istop": ${istop != null?'${json.encode(istop)}':'null'},"posttime": ${posttime != null?'${json.encode(posttime)}':'null'},"title": ${title != null?'${json.encode(title)}':'null'},"type": ${type != null?'${json.encode(type)}':'null'}}';
  }
}

